const conditions = [
  {
    name: 'resource.name',
    comments: '名称',
    tag: 'el-input',
    queryType: 'like',
    operations: [{value: 'like', label: '包含'}, {value: 'not like', label: '不包含'},
            {value: '=', label: '等于'}, {value: '<>', label: '不等于'}],
    attribute: {}
  },
  {
    name: 'resource.code',
    comments: '编号',
    tag: 'el-input',
    queryType: 'like',
    operations: [{value: 'like', label: '包含'}, {value: 'not like', label: '不包含'},
            {value: '=', label: '等于'}, {value: '<>', label: '不等于'}],
    attribute: {}
  },
  {
    name: 'resource.url',
    comments: 'URL',
    tag: 'el-input',
    queryType: 'like',
    operations: [{value: 'like', label: '包含'}, {value: 'not like', label: '不包含'},
            {value: '=', label: '等于'}, {value: '<>', label: '不等于'}],
    attribute: {}
  },
  {
    name: 'resource.permission',
    comments: '权限',
    tag: 'el-input',
    queryType: 'like',
    operations: [{value: 'like', label: '包含'}, {value: 'not like', label: '不包含'},
            {value: '=', label: '等于'}, {value: '<>', label: '不等于'}],
    attribute: {}
  },
  {
    name: 'resource.router_id',
    comments: '路由',
    tag: 'el-cascader',
    queryType: '=',
    operations: [{value: '=', label: '等于'}, {value: '<>', label: '不等于'}, {value: 'in', label: '在列表'}, {value: 'not in', label: '不在列表'}],
    attribute: { 
      fieldId: 'id',
      labelField: 'name', 
      className: 'Router', 
      tableId: 'sys_router', 
      apiPath: 'sys/router',
      filter: ''
    }
  },
  {
    name: 'resource.can_permission',
    comments: '可以授权',
    tag: 'el-switch',
    queryType: '=',
    operations: [{value: '=', label: '等于'}, {value: '<>', label: '不等于'}],
    attribute: {'active-value': '1', 'inactive-value': '0'}
  },
  {
    name: 'resource.is_default',
    comments: '默认资源',
    tag: 'el-switch',
    queryType: '=',
    operations: [{value: '=', label: '等于'}, {value: '<>', label: '不等于'}],
    attribute: {'active-value': '1', 'inactive-value': '0'}
  },
  {
    name: 'resource.is_locked',
    comments: '禁用',
    tag: 'el-switch',
    queryType: '=',
    operations: [{value: '=', label: '等于'}, {value: '<>', label: '不等于'}],
    attribute: {'active-value': '1', 'inactive-value': '0'}
  },
  {
    name: 'resource.create_by',
    comments: '创建者',
    tag: 'el-input',
    queryType: 'like',
    operations: [{value: 'like', label: '包含'}, {value: 'not like', label: '不包含'},
            {value: '=', label: '等于'}, {value: '<>', label: '不等于'}],
    attribute: {}
  },
  {
    name: 'resource.create_date',
    comments: '创建时间',
    tag: 'el-date-picker',
    queryType: '=',
    operations: [{value: '=', label: '等于'}, {value: '<>', label: '不等于'}, {value: 'between', label: '介于'}, {value: 'not between', label: '不介于'}],
    attribute: {type: 'datetime', 'value-format': 'YYYY-MM-DD HH:mm:ss'}
  },
  {
    name: 'resource.update_by',
    comments: '更新者',
    tag: 'el-input',
    queryType: 'like',
    operations: [{value: 'like', label: '包含'}, {value: 'not like', label: '不包含'},
            {value: '=', label: '等于'}, {value: '<>', label: '不等于'}],
    attribute: {}
  },
  {
    name: 'resource.update_date',
    comments: '更新时间',
    tag: 'el-date-picker',
    queryType: '=',
    operations: [{value: '=', label: '等于'}, {value: '<>', label: '不等于'}, {value: 'between', label: '介于'}, {value: 'not between', label: '不介于'}],
    attribute: {type: 'datetime', 'value-format': 'YYYY-MM-DD HH:mm:ss'}
  }
]

const meta = [
  {
    id: 'sys_resource',
    name: '资源表',
    conditionPanel: conditions,
    type: 'main',
    dataRules: []
  }
]

export default meta 